package com.dmooo.yxmmerchant.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dmooo.yxmmerchant.R;
import com.dmooo.yxmmerchant.domain.ShopAdminBean;

import java.util.List;

public class ShopAdminAdapter extends BaseQuickAdapter<ShopAdminBean.Item,BaseViewHolder> {
    public ShopAdminAdapter(int layoutResId, @Nullable List<ShopAdminBean.Item> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShopAdminBean.Item item) {
        helper.setText(R.id.txt_sort,item.auth_name);
        helper.setText(R.id.txt_job_num,item.truename);
        helper.setText(R.id.txt_status,"Y".equals(item.is_freeze)?"已冻结":"启用");
        helper.addOnClickListener(R.id.img_del).addOnClickListener(R.id.img_edit);
    }
}
